Vercel
API ReferenceChats

Create Chat (Async)

Creates a new chat with a user message and processes it in the background. Returns immediately with the chat ID and a "queued" status. Poll the apiUrl to check for completion.

POST/v2/chats/async

Usage

TypeScript Example
import { v0 } from 'v0-sdk'const result = await v0.chats.createAsync({  message: 'Hello, world!',  type: 'prompt',})console.log(result)

API Signature

Request

Request Body

message: string

The prompt or instruction to send to the model.

systemPrompt?: string

System-level context for the chat, such as frameworks or development environment details.

modelConfiguration?: object

Overrides for the model behavior.

modelId: 'v0-auto' | 'v0-mini' | 'v0-pro' | 'v0-max' | 'v0-max-fast'

Model to use for the generation.

imageGenerations: boolean

Enables image generations to generate up to 5 images per version.

attachments?: object[]

Files or assets to include with the message.

url: string

URL of the attachment.

mcpServerIds?: string[]

MCP server IDs to enable. When omitted, uses default enabled servers.

skillIds?: string[]

Skill IDs (from skills.sh) to attach. Skills provide domain-specific knowledge to the AI. Maximum 3.

type: 'prompt'

Initialize the chat by sending a prompt to the model.

privacy?: 'public' | 'private' | 'team' | 'team-edit' | 'unlisted'

Visibility setting for the new chat.

title?: string

Title for the new chat.

metadata?: Record<string, string>

Arbitrary key-value data to attach to the chat.

Response

id: string

Unique chat identifier.

assistantMessageId: string

ID of the assistant message that will receive the response. Poll this message by ID and check its finishReason field to detect completion.

object: 'chat'

Object type identifier.

status: 'queued'

The chat is being processed in the background. Poll for the chat to check for completion.

On this page